<html>
<head>
	<title>catalog</title>
	<link href="<?php echo  base_url();?>public/css/bootstrap.min.css" rel="stylesheet">
	<link href="<?php echo  base_url();?>public/css/bootstrap-theme.min.css" rel="stylesheet">
	<link href="<?php echo  base_url();?>public/css/style.css" rel="stylesheet">
</head>
<body>
	<?php $this->load->view('admin/header')?>
	<div class="container">
		<h2>分类<small>列表</small><a class="btn btn-success btn-sm pull-right" href="<?php echo site_url("admin/catalog/add")?>">添加</a></h2>
		<table class="table table-bordered table-hover table-condensed">
			<tr>
				<td>id</td>
				<td>名称</td>
				<td>操作</td>
			</tr>
		<?php foreach ($catalogs as $d) {?>
			<tr> 
				<td><?php echo $d->id;?></td>
				<td><?php echo $d->name;?></td>
				<td>
				<a class="btn btn-warning btn-xs" href="<?php echo site_url("admin/catalog/edit/$d->id")?>">修改</a>&nbsp;
				<a class="btn btn-danger btn-xs" href="<?php echo site_url("admin/catalog/del/$d->id")?>" >删除</a></td>
			</tr>
		<?php }?>
		</table>
	</div>
</body>
</html>